//===================================================================================
// $$
//
// Coder: Code Milker v1.0
// 0 - EntityName
// 1 - Properties
//===================================================================================

namespace App.Domain.Handlers {
    using App.Data;
    using App.Domain.Contracts;
    using App.Domain.Models;

    public class UpdateApplication {
        private readonly IApplicationRepository _applicationRepository;

        public UpdateApplication(IApplicationRepository applicationRepository) {
            _applicationRepository = applicationRepository;
        }

        public void Execute(ICreateApplicationCommand applicationForm) {
            var application = applicationForm.ConvertToEntity();

            _applicationRepository.Update(application);
        }
    }
}
